package edu.sctu.renpingan.day20150517.textone;

/**
* Created by user18 on 2015/5/12.
*/
public class TextFive {


    public static void main(String[] args) {
          int k=0;
        TextThere[] textTheres = new TextThere[10];

        for (int i = 0;i<10;i++) {

            TextThere textThere = new TextThere();
            textThere.setNumber(1406101018+i);
            textThere.setAdress("China");
            textThere.setAge(25+i);
            textThere.setName("king");
            textThere.setGrade(56+i);

            textTheres[i] = textThere;
        }

        TextTwo textTwo = new TextTwo(textTheres);
   for ( TextThere student: textTwo.getSysyTem()){
       if (student!=null){
           System.out.println(student.getName()+"  "+student.getGrade()+"  "+student.getNumber()+"  "+student.getAge()+"  "+student.getAdress());
       k++;
       }

   }textTwo.GetInterface(new TextInterfaceWay(){
    TextThere[] textThere = new TextThere[10];
    @Override
    public TextThere[] chooseAge(int age) {
        for (int i = 0; i <textTheres.length; i++) {
            if(textTheres[i].getAge() > age){
                textThere[i] = textTheres[i];

            }

        }
        return textThere;
    }
});
    }
}
